package oop2.oop3;

/**
 * @author oldliu
 * @since 1.0
 */
public class GoldenFish extends Pet {
    public GoldenFish(String name,int h,int l){
        super(name,h,l);//调用父类的构造方法
        System.out.println("金鱼构造方法调用了");
    }
    public void swim(){
        System.out.println(super.getName()+"在鱼缸中游泳！");
        System.out.println("可爱程度："+super.getLove()+",健康："+super.health);
    }

    public void sleep(){
        System.out.println(super.getName()+"从来不睡觉");
    }
    public void eat(){
        super.eat();
        System.out.println(super.getName()+"喝水就是吃饭");
    }

}
